package Num5;

/**
 * @projectName: LeetCode
 * @package: Num5
 * @className: Solution
 * @author: Tongxinxin
 * @description: 优选算法第一题 283移动零
 * @date: 2025/9/5 9:32
 * @version: 1.0
 */
public class Solution {
    public void moveZeroes(int[] nums) {
        int left=0,right=0;
        while(right<nums.length){
            if(nums[right]==0){
                right++;
                continue;
            }
            int tmp=0;
            tmp=nums[left];
            nums[left]=nums[right];
            nums[right]=tmp;
            right++;
            left++;
        }
    }
}
